import request from '@/utils/request'


// 查询充电费率模版下拉数据
export function dataToSelect() {
  return request({
    url: '/business/chargeRate/dataToSelect',
    method: 'get',
  })
}
// 查询充电费率模版信息列表
export function getInfoByRateId(rateId) {
  return request({
    url: `/business/chargeRateDetail/getInfoByRateId/${rateId}`,
    method: 'get',
  })
}
// 查询充电费率信息列表
export function listChargeRate(query) {
  return request({
    url: '/business/chargeRate/list',
    method: 'get',
    params: query
  })
}

// 查询充电费率信息详细
export function getChargeRate(rateId) {
  return request({
    url: '/business/chargeRate/getInfoById/' + rateId,
    method: 'get'
  })
}

// 新增充电费率信息
export function addChargeRate(data) {
  return request({
    url: '/business/chargeRate/add',
    method: 'post',
    data: data
  })
}

// 修改充电费率信息
export function updateChargeRate(data) {
  return request({
    url: '/business/chargeRate/edit',
    method: 'put',
    data: data
  })
}

// 删除充电费率信息
export function delChargeRate(rateId) {
  return request({
    url: '/business/chargeRate/remove/' + rateId,
    method: 'delete'
  })
}
